<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621680921831"><span id="local-6989586621680921832"></span></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- GHC Driver</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- (c) The University of Glasgow 2002</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Driver.Phases</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier">HscSource</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHsBootOrSig"><span class="hs-identifier">isHsBootOrSig</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHsigFile"><span class="hs-identifier">isHsigFile</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#hscSourceString"><span class="hs-identifier">hscSourceString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier">Phase</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#happensBefore"><span class="hs-identifier">happensBefore</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier">eqPhase</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#anyHsc"><span class="hs-identifier">anyHsc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isStopLn"><span class="hs-identifier">isStopLn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier">startPhase</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier">phaseInputExt</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishSuffix"><span class="hs-identifier">isHaskellishSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSrcSuffix"><span class="hs-identifier">isHaskellSrcSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isBackpackishSuffix"><span class="hs-identifier">isBackpackishSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isObjectSuffix"><span class="hs-identifier">isObjectSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isCishSuffix"><span class="hs-identifier">isCishSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isDynLibSuffix"><span class="hs-identifier">isDynLibSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellUserSrcSuffix"><span class="hs-identifier">isHaskellUserSrcSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSigSuffix"><span class="hs-identifier">isHaskellSigSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isSourceSuffix"><span class="hs-identifier">isSourceSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishTarget"><span class="hs-identifier">isHaskellishTarget</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishFilename"><span class="hs-identifier">isHaskellishFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSrcFilename"><span class="hs-identifier">isHaskellSrcFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSigFilename"><span class="hs-identifier">isHaskellSigFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isObjectFilename"><span class="hs-identifier">isObjectFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isCishFilename"><span class="hs-identifier">isCishFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isDynLibFilename"><span class="hs-identifier">isDynLibFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellUserSrcFilename"><span class="hs-identifier">isHaskellUserSrcFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#isSourceFilename"><span class="hs-identifier">isSourceFilename</span></a></span><span>
</span><span id="line-38"></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Binary.html"><span class="hs-identifier">GHC.Utils.Binary</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- Phases</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-comment">{-
   Phase of the           | Suffix saying | Flag saying   | (suffix of)
   compilation system     | ``start here''| ``stop after''| output file

   literate pre-processor | .lhs          | -             | -
   C pre-processor (opt.) | -             | -E            | -
   Haskell compiler       | .hs           | -C, -S        | .hc, .s
   C compiler (opt.)      | .hc or .c     | -S            | .s
   assembler              | .s  or .S     | -c            | .o
   linker                 | other         | -             | a.out
-}</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="hs-comment">-- Note [HscSource types]</span><span>
</span><span id="line-66"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-67"></span><span class="hs-comment">-- There are three types of source file for Haskell code:</span><span>
</span><span id="line-68"></span><span class="hs-comment">--</span><span>
</span><span id="line-69"></span><span class="hs-comment">--      * HsSrcFile is an ordinary hs file which contains code,</span><span>
</span><span id="line-70"></span><span class="hs-comment">--</span><span>
</span><span id="line-71"></span><span class="hs-comment">--      * HsBootFile is an hs-boot file, which is used to break</span><span>
</span><span id="line-72"></span><span class="hs-comment">--        recursive module imports (there will always be an</span><span>
</span><span id="line-73"></span><span class="hs-comment">--        HsSrcFile associated with it), and</span><span>
</span><span id="line-74"></span><span class="hs-comment">--</span><span>
</span><span id="line-75"></span><span class="hs-comment">--      * HsigFile is an hsig file, which contains only type</span><span>
</span><span id="line-76"></span><span class="hs-comment">--        signatures and is used to specify signatures for</span><span>
</span><span id="line-77"></span><span class="hs-comment">--        modules.</span><span>
</span><span id="line-78"></span><span class="hs-comment">--</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- Syntactically, hs-boot files and hsig files are quite similar: they</span><span>
</span><span id="line-80"></span><span class="hs-comment">-- only include type signatures and must be associated with an</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- actual HsSrcFile.  isHsBootOrSig allows us to abstract over code</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- which is indifferent to which.  However, there are some important</span><span>
</span><span id="line-83"></span><span class="hs-comment">-- differences, mostly owing to the fact that hsigs are proper</span><span>
</span><span id="line-84"></span><span class="hs-comment">-- modules (you `import Sig` directly) whereas HsBootFiles are</span><span>
</span><span id="line-85"></span><span class="hs-comment">-- temporary placeholders (you `import {-# SOURCE #-} Mod).</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- When we finish compiling the true implementation of an hs-boot,</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- we replace the HomeModInfo with the real HsSrcFile.  An HsigFile, on the</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- other hand, is never replaced (in particular, we *cannot* use the</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- HomeModInfo of the original HsSrcFile backing the signature, since it</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- will export too many symbols.)</span><span>
</span><span id="line-91"></span><span class="hs-comment">--</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- Additionally, while HsSrcFile is the only Haskell file</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- which has *code*, we do generate .o files for HsigFile, because</span><span>
</span><span id="line-94"></span><span class="hs-comment">-- this is how the recompilation checker figures out if a file</span><span>
</span><span id="line-95"></span><span class="hs-comment">-- needs to be recompiled.  These are fake object files which</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- should NOT be linked against.</span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-keyword">data</span><span> </span><span id="HscSource"><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-var">HscSource</span></a></span></span><span>
</span><span id="line-99"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="HsSrcFile"><span class="annot"><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="HsBootFile"><span class="annot"><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="HsigFile"><span class="annot"><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span></span><span>
</span><span id="line-100"></span><span>     </span><span class="hs-keyword">deriving</span><span class="hs-special">(</span><span> </span><span id="local-6989586621680921773"><span id="local-6989586621680921775"><span class="annot"><span class="annottext">HscSource -&gt; HscSource -&gt; Bool
(HscSource -&gt; HscSource -&gt; Bool)
-&gt; (HscSource -&gt; HscSource -&gt; Bool) -&gt; Eq HscSource
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: HscSource -&gt; HscSource -&gt; Bool
$c/= :: HscSource -&gt; HscSource -&gt; Bool
== :: HscSource -&gt; HscSource -&gt; Bool
$c== :: HscSource -&gt; HscSource -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921753"><span id="local-6989586621680921755"><span id="local-6989586621680921758"><span id="local-6989586621680921761"><span id="local-6989586621680921764"><span id="local-6989586621680921766"><span id="local-6989586621680921768"><span class="annot"><span class="annottext">Eq HscSource
Eq HscSource
-&gt; (HscSource -&gt; HscSource -&gt; Ordering)
-&gt; (HscSource -&gt; HscSource -&gt; Bool)
-&gt; (HscSource -&gt; HscSource -&gt; Bool)
-&gt; (HscSource -&gt; HscSource -&gt; Bool)
-&gt; (HscSource -&gt; HscSource -&gt; Bool)
-&gt; (HscSource -&gt; HscSource -&gt; HscSource)
-&gt; (HscSource -&gt; HscSource -&gt; HscSource)
-&gt; Ord HscSource
HscSource -&gt; HscSource -&gt; Bool
HscSource -&gt; HscSource -&gt; Ordering
HscSource -&gt; HscSource -&gt; HscSource
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: HscSource -&gt; HscSource -&gt; HscSource
$cmin :: HscSource -&gt; HscSource -&gt; HscSource
max :: HscSource -&gt; HscSource -&gt; HscSource
$cmax :: HscSource -&gt; HscSource -&gt; HscSource
&gt;= :: HscSource -&gt; HscSource -&gt; Bool
$c&gt;= :: HscSource -&gt; HscSource -&gt; Bool
&gt; :: HscSource -&gt; HscSource -&gt; Bool
$c&gt; :: HscSource -&gt; HscSource -&gt; Bool
&lt;= :: HscSource -&gt; HscSource -&gt; Bool
$c&lt;= :: HscSource -&gt; HscSource -&gt; Bool
&lt; :: HscSource -&gt; HscSource -&gt; Bool
$c&lt; :: HscSource -&gt; HscSource -&gt; Bool
compare :: HscSource -&gt; HscSource -&gt; Ordering
$ccompare :: HscSource -&gt; HscSource -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921746"><span id="local-6989586621680921748"><span id="local-6989586621680921750"><span class="annot"><span class="annottext">Int -&gt; HscSource -&gt; ShowS
[HscSource] -&gt; ShowS
HscSource -&gt; String
(Int -&gt; HscSource -&gt; ShowS)
-&gt; (HscSource -&gt; String)
-&gt; ([HscSource] -&gt; ShowS)
-&gt; Show HscSource
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [HscSource] -&gt; ShowS
$cshowList :: [HscSource] -&gt; ShowS
show :: HscSource -&gt; String
$cshow :: HscSource -&gt; String
showsPrec :: Int -&gt; HscSource -&gt; ShowS
$cshowsPrec :: Int -&gt; HscSource -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-comment">-- Ord needed for the finite maps we build in CompManager</span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680921742"><span class="annot"><a href="GHC.Utils.Binary.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-104"></span><span>    </span><span id="local-6989586621680921735"><span class="annot"><span class="annottext">put_ :: BinHandle -&gt; HscSource -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var hs-var hs-var hs-var">put_</span></a></span></span><span> </span><span id="local-6989586621680921733"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921733"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921733"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span>
</span><span id="line-105"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680921731"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921731"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921731"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span>
</span><span id="line-106"></span><span>    </span><span class="annot"><a href="GHC.Utils.Binary.html#put_"><span class="hs-identifier hs-var">put_</span></a></span><span> </span><span id="local-6989586621680921730"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921730"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; Word8 -&gt; IO ()
</span><a href="GHC.Utils.Binary.html#putByte"><span class="hs-identifier hs-var">putByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921730"><span class="hs-identifier hs-var">bh</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">2</span></span><span>
</span><span id="line-107"></span><span>    </span><span id="local-6989586621680921719"><span class="annot"><span class="annottext">get :: BinHandle -&gt; IO HscSource
</span><a href="GHC.Utils.Binary.html#get"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span id="local-6989586621680921717"><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921717"><span class="hs-identifier hs-var">bh</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-108"></span><span>        </span><span id="local-6989586621680921716"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680921716"><span class="hs-identifier hs-var">h</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">BinHandle -&gt; IO Word8
</span><a href="GHC.Utils.Binary.html#getByte"><span class="hs-identifier hs-var">getByte</span></a></span><span> </span><span class="annot"><span class="annottext">BinHandle
</span><a href="#local-6989586621680921717"><span class="hs-identifier hs-var">bh</span></a></span><span>
</span><span id="line-109"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621680921716"><span class="hs-identifier hs-var">h</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-110"></span><span>            </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; IO HscSource
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>
</span><span id="line-111"></span><span>            </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">1</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; IO HscSource
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span>
</span><span id="line-112"></span><span>            </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; IO HscSource
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span>
</span><span id="line-113"></span><span>
</span><span id="line-114"></span><span class="annot"><a href="GHC.Driver.Phases.html#hscSourceString"><span class="hs-identifier hs-type">hscSourceString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-115"></span><span id="hscSourceString"><span class="annot"><span class="annottext">hscSourceString :: HscSource -&gt; String
</span><a href="GHC.Driver.Phases.html#hscSourceString"><span class="hs-identifier hs-var hs-var">hscSourceString</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-116"></span><span class="annot"><a href="GHC.Driver.Phases.html#hscSourceString"><span class="hs-identifier hs-var">hscSourceString</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[boot]&quot;</span></span><span>
</span><span id="line-117"></span><span class="annot"><a href="GHC.Driver.Phases.html#hscSourceString"><span class="hs-identifier hs-var">hscSourceString</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;[sig]&quot;</span></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="hs-comment">-- See Note [isHsBootOrSig]</span><span>
</span><span id="line-120"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHsBootOrSig"><span class="hs-identifier hs-type">isHsBootOrSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-121"></span><span id="isHsBootOrSig"><span class="annot"><span class="annottext">isHsBootOrSig :: HscSource -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHsBootOrSig"><span class="hs-identifier hs-var hs-var">isHsBootOrSig</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-122"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHsBootOrSig"><span class="hs-identifier hs-var">isHsBootOrSig</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-123"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHsBootOrSig"><span class="hs-identifier hs-var">isHsBootOrSig</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHsigFile"><span class="hs-identifier hs-type">isHsigFile</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-126"></span><span id="isHsigFile"><span class="annot"><span class="annottext">isHsigFile :: HscSource -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHsigFile"><span class="hs-identifier hs-var hs-var">isHsigFile</span></a></span></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-127"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHsigFile"><span class="hs-identifier hs-var">isHsigFile</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span class="hs-keyword">data</span><span> </span><span id="Phase"><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-var">Phase</span></a></span></span><span>
</span><span id="line-130"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="Unlit"><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-var">Unlit</span></a></span></span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span>
</span><span id="line-131"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Cpp"><span class="annot"><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-var">Cpp</span></a></span></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span>
</span><span id="line-132"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HsPp"><span class="annot"><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-var">HsPp</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span>
</span><span id="line-133"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Hsc"><span class="annot"><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-var">Hsc</span></a></span></span><span>   </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Ccxx"><span class="annot"><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span></span><span>          </span><span class="hs-comment">-- Compile C++</span><span>
</span><span id="line-135"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Cc"><span class="annot"><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span></span><span>            </span><span class="hs-comment">-- Compile C</span><span>
</span><span id="line-136"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Cobjc"><span class="annot"><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span></span><span>         </span><span class="hs-comment">-- Compile Objective-C</span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Cobjcxx"><span class="annot"><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span></span><span>       </span><span class="hs-comment">-- Compile Objective-C++</span><span>
</span><span id="line-138"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="HCc"><span class="annot"><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span></span><span>           </span><span class="hs-comment">-- Haskellised C (as opposed to vanilla C) compilation</span><span>
</span><span id="line-139"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="As"><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>       </span><span class="hs-comment">-- Assembler for regular assembly files (Bool: with-cpp)</span><span>
</span><span id="line-140"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="LlvmOpt"><span class="annot"><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span></span><span>       </span><span class="hs-comment">-- Run LLVM opt tool over llvm assembly</span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="LlvmLlc"><span class="annot"><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span></span><span>       </span><span class="hs-comment">-- LLVM bitcode to native assembly</span><span>
</span><span id="line-142"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="LlvmMangle"><span class="annot"><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span></span><span>    </span><span class="hs-comment">-- Fix up TNTC by processing assembly produced by LLVM</span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="CmmCpp"><span class="annot"><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span></span><span>        </span><span class="hs-comment">-- pre-process Cmm source</span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="Cmm"><span class="annot"><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span></span><span>           </span><span class="hs-comment">-- parse &amp; compile Cmm code</span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="MergeForeign"><span class="annot"><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span></span><span>  </span><span class="hs-comment">-- merge in the foreign object files</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span>        </span><span class="hs-comment">-- The final phase is a pseudo-phase that tells the pipeline to stop.</span><span>
</span><span id="line-148"></span><span>        </span><span class="hs-comment">-- There is no runPhase case for it.</span><span>
</span><span id="line-149"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="StopLn"><span class="annot"><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span></span><span>        </span><span class="hs-comment">-- Stop, but linking will follow, so generate .o file</span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921689"><span id="local-6989586621680921696"><span class="annot"><span class="annottext">Phase -&gt; Phase -&gt; Bool
(Phase -&gt; Phase -&gt; Bool) -&gt; (Phase -&gt; Phase -&gt; Bool) -&gt; Eq Phase
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Phase -&gt; Phase -&gt; Bool
$c/= :: Phase -&gt; Phase -&gt; Bool
== :: Phase -&gt; Phase -&gt; Bool
$c== :: Phase -&gt; Phase -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680921671"><span id="local-6989586621680921673"><span id="local-6989586621680921687"><span class="annot"><span class="annottext">Int -&gt; Phase -&gt; ShowS
[Phase] -&gt; ShowS
Phase -&gt; String
(Int -&gt; Phase -&gt; ShowS)
-&gt; (Phase -&gt; String) -&gt; ([Phase] -&gt; ShowS) -&gt; Show Phase
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Phase] -&gt; ShowS
$cshowList :: [Phase] -&gt; ShowS
show :: Phase -&gt; String
$cshow :: Phase -&gt; String
showsPrec :: Int -&gt; Phase -&gt; ShowS
$cshowsPrec :: Int -&gt; Phase -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680921668"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-153"></span><span>    </span><span id="local-6989586621680921665"><span class="annot"><span class="annottext">ppr :: Phase -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span id="local-6989586621680921663"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921663"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Phase -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921663"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>
</span><span id="line-155"></span><span class="annot"><a href="GHC.Driver.Phases.html#anyHsc"><span class="hs-identifier hs-type">anyHsc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span>
</span><span id="line-156"></span><span id="anyHsc"><span class="annot"><span class="annottext">anyHsc :: Phase
</span><a href="GHC.Driver.Phases.html#anyHsc"><span class="hs-identifier hs-var hs-var">anyHsc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-var">Hsc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; HscSource
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;anyHsc&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="annot"><a href="GHC.Driver.Phases.html#isStopLn"><span class="hs-identifier hs-type">isStopLn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-159"></span><span id="isStopLn"><span class="annot"><span class="annottext">isStopLn :: Phase -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isStopLn"><span class="hs-identifier hs-var hs-var">isStopLn</span></a></span></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-160"></span><span class="annot"><a href="GHC.Driver.Phases.html#isStopLn"><span class="hs-identifier hs-var">isStopLn</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><span class="hs-identifier">_</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-type">eqPhase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-163"></span><span class="hs-comment">-- Equality of constructors, ignoring the HscSource field</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- NB: the HscSource field can be 'bot'; see anyHsc above</span><span>
</span><span id="line-165"></span><span id="eqPhase"><span class="annot"><span class="annottext">eqPhase :: Phase -&gt; Phase -&gt; Bool
</span><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var hs-var">eqPhase</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-166"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-type">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-type">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-type">HsPp</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-type">HsPp</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-168"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-169"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>          </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-170"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span>       </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-171"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>         </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-172"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-type">As</span></a></span><span> </span><span id="local-6989586621680921659"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680921659"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-type">As</span></a></span><span> </span><span id="local-6989586621680921658"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680921658"><span class="hs-identifier hs-var">y</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680921659"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680921658"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-173"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span><span>     </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-174"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>     </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-175"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span>  </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-176"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-177"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>         </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-179"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-180"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>        </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-181"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>     </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-182"></span><span class="annot"><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-identifier hs-var">eqPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><span class="hs-identifier">_</span></span><span>           </span><span class="annot"><span class="annottext">Phase
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-comment">{- Note [Partial ordering on phases]

We want to know which phases will occur before which others. This is used for
sanity checking, to ensure that the pipeline will stop at some point (see
GHC.Driver.Pipeline.runPipeline).

A &lt; B iff A occurs before B in a normal compilation pipeline.

There is explicitly not a total ordering on phases, because in registerised
builds, the phase `HsC` doesn't happen before nor after any other phase.

Although we check that a normal user doesn't set the stop_phase to HsC through
use of -C with registerised builds (in Main.checkOptions), it is still
possible for a ghc-api user to do so. So be careful when using the function
happensBefore, and don't think that `not (a &lt;= b)` implies `b &lt; a`.
-}</span><span>
</span><span id="line-200"></span><span class="annot"><a href="GHC.Driver.Phases.html#happensBefore"><span class="hs-identifier hs-type">happensBefore</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-201"></span><span id="happensBefore"><span class="annot"><span class="annottext">happensBefore :: Platform -&gt; Phase -&gt; Phase -&gt; Bool
</span><a href="GHC.Driver.Phases.html#happensBefore"><span class="hs-identifier hs-var hs-var">happensBefore</span></a></span></span><span> </span><span id="local-6989586621680921657"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921657"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921656"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921656"><span class="hs-identifier hs-var">p1</span></a></span></span><span> </span><span id="local-6989586621680921655"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921655"><span class="hs-identifier hs-var">p2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921656"><span class="hs-identifier hs-var">p1</span></a></span><span> </span><span class="annot"><span class="annottext">Phase -&gt; Phase -&gt; Bool
</span><a href="#local-6989586621680921654"><span class="hs-operator hs-var">`happensBefore'`</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921655"><span class="hs-identifier hs-var">p2</span></a></span><span>
</span><span id="line-202"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span> </span><span id="local-6989586621680921654"><span class="annot"><span class="annottext">happensBefore' :: Phase -&gt; Phase -&gt; Bool
</span><a href="#local-6989586621680921654"><span class="hs-operator hs-var hs-var">`happensBefore'`</span></a></span></span><span> </span><span class="annot"><span class="annottext">Phase
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-203"></span><span>          </span><span id="local-6989586621680921653"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921653"><span class="hs-identifier hs-var">x</span></a></span></span><span>      </span><span class="annot"><a href="#local-6989586621680921654"><span class="hs-operator hs-var">`happensBefore'`</span></a></span><span> </span><span id="local-6989586621680921652"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921652"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921651"><span class="hs-identifier hs-var">after_x</span></a></span><span> </span><span class="annot"><span class="annottext">Phase -&gt; Phase -&gt; Bool
</span><a href="GHC.Driver.Phases.html#eqPhase"><span class="hs-operator hs-var">`eqPhase`</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921652"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-204"></span><span>                                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921651"><span class="hs-identifier hs-var">after_x</span></a></span><span> </span><span class="annot"><span class="annottext">Phase -&gt; Phase -&gt; Bool
</span><a href="#local-6989586621680921654"><span class="hs-operator hs-var">`happensBefore'`</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921652"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-205"></span><span>              </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680921651"><span class="annot"><span class="annottext">after_x :: Phase
</span><a href="#local-6989586621680921651"><span class="hs-identifier hs-var hs-var">after_x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Phase -&gt; Phase
</span><a href="GHC.Driver.Phases.html#nextPhase"><span class="hs-identifier hs-var">nextPhase</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921657"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921653"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.Driver.Phases.html#nextPhase"><span class="hs-identifier hs-type">nextPhase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span>
</span><span id="line-208"></span><span id="nextPhase"><span class="annot"><span class="annottext">nextPhase :: Platform -&gt; Phase -&gt; Phase
</span><a href="GHC.Driver.Phases.html#nextPhase"><span class="hs-identifier hs-var hs-var">nextPhase</span></a></span></span><span> </span><span id="local-6989586621680921648"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921648"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921647"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921647"><span class="hs-identifier hs-var">p</span></a></span></span><span>
</span><span id="line-209"></span><span>    </span><span class="hs-comment">-- A conservative approximation to the next phase, used in happensBefore</span><span>
</span><span id="line-210"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921647"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-211"></span><span>      </span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span id="local-6989586621680921646"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921646"><span class="hs-identifier hs-var">sf</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-var">Cpp</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921646"><span class="hs-identifier hs-var">sf</span></a></span><span>
</span><span id="line-212"></span><span>      </span><span class="annot"><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-type">Cpp</span></a></span><span>   </span><span id="local-6989586621680921645"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921645"><span class="hs-identifier hs-var">sf</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-var">HsPp</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921645"><span class="hs-identifier hs-var">sf</span></a></span><span>
</span><span id="line-213"></span><span>      </span><span class="annot"><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-type">HsPp</span></a></span><span>  </span><span id="local-6989586621680921644"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921644"><span class="hs-identifier hs-var">sf</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-var">Hsc</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621680921644"><span class="hs-identifier hs-var">sf</span></a></span><span>
</span><span id="line-214"></span><span>      </span><span class="annot"><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921643"><span class="hs-identifier hs-var">maybeHCc</span></a></span><span>
</span><span id="line-215"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>
</span><span id="line-216"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span>
</span><span id="line-217"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-218"></span><span>      </span><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-type">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span><span>
</span><span id="line-219"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-220"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-221"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-222"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-223"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>
</span><span id="line-224"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921643"><span class="hs-identifier hs-var">maybeHCc</span></a></span><span>
</span><span id="line-225"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-226"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>
</span><span id="line-227"></span><span>      </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Phase
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nextPhase: nothing after StopLn&quot;</span></span><span>
</span><span id="line-228"></span><span>    </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621680921643"><span class="annot"><span class="annottext">maybeHCc :: Phase
</span><a href="#local-6989586621680921643"><span class="hs-identifier hs-var hs-var">maybeHCc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformUnregisterised"><span class="hs-identifier hs-var hs-var">platformUnregisterised</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921648"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-229"></span><span>                     </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>
</span><span id="line-230"></span><span>                     </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span class="hs-comment">-- the first compilation phase for a given file is determined</span><span>
</span><span id="line-233"></span><span class="hs-comment">-- by its suffix.</span><span>
</span><span id="line-234"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-type">startPhase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span>
</span><span id="line-235"></span><span id="startPhase"><span class="annot"><span class="annottext">startPhase :: String -&gt; Phase
</span><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var hs-var">startPhase</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs&quot;</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-var">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>
</span><span id="line-236"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs-boot&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-var">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span>
</span><span id="line-237"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhsig&quot;</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-var">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span>
</span><span id="line-238"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-var">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>
</span><span id="line-239"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs-boot&quot;</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-var">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span>
</span><span id="line-240"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hsig&quot;</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-var">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span>
</span><span id="line-241"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hscpp&quot;</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-var">HsPp</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>
</span><span id="line-242"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hspp&quot;</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource -&gt; Phase
</span><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-var">Hsc</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span>
</span><span id="line-243"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hc&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>
</span><span id="line-244"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;c&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>
</span><span id="line-245"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cpp&quot;</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>
</span><span id="line-246"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>
</span><span id="line-247"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;m&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span>
</span><span id="line-248"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;M&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>
</span><span id="line-249"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mm&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>
</span><span id="line-250"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cc&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>
</span><span id="line-251"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cxx&quot;</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>
</span><span id="line-252"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;s&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-253"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;S&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-254"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ll&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span><span>
</span><span id="line-255"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bc&quot;</span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>
</span><span id="line-256"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lm_s&quot;</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span>
</span><span id="line-257"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmm&quot;</span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span>
</span><span id="line-259"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmmcpp&quot;</span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>
</span><span id="line-260"></span><span class="annot"><a href="GHC.Driver.Phases.html#startPhase"><span class="hs-identifier hs-var">startPhase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>     </span><span class="hs-comment">-- all unknown file types</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="hs-comment">-- This is used to determine the extension for the output from the</span><span>
</span><span id="line-263"></span><span class="hs-comment">-- current phase (if it generates a new file).  The extension depends</span><span>
</span><span id="line-264"></span><span class="hs-comment">-- on the next phase in the pipeline.</span><span>
</span><span id="line-265"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-type">phaseInputExt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-266"></span><span id="phaseInputExt"><span class="annot"><span class="annottext">phaseInputExt :: Phase -&gt; String
</span><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var hs-var">phaseInputExt</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsSrcFile"><span class="hs-identifier hs-var">HsSrcFile</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs&quot;</span></span><span>
</span><span id="line-267"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsBootFile"><span class="hs-identifier hs-var">HsBootFile</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs-boot&quot;</span></span><span>
</span><span id="line-268"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Unlit"><span class="hs-identifier hs-type">Unlit</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="GHC.Driver.Phases.html#HsigFile"><span class="hs-identifier hs-var">HsigFile</span></a></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhsig&quot;</span></span><span>
</span><span id="line-269"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Cpp"><span class="hs-identifier hs-type">Cpp</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lpp&quot;</span></span><span>       </span><span class="hs-comment">-- intermediate only</span><span>
</span><span id="line-270"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#HsPp"><span class="hs-identifier hs-type">HsPp</span></a></span><span>  </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hscpp&quot;</span></span><span>     </span><span class="hs-comment">-- intermediate only</span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#Hsc"><span class="hs-identifier hs-type">Hsc</span></a></span><span>   </span><span class="annot"><span class="annottext">HscSource
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hspp&quot;</span></span><span>      </span><span class="hs-comment">-- intermediate only</span><span>
</span><span id="line-272"></span><span>        </span><span class="hs-comment">-- NB: as things stand, phaseInputExt (Hsc x) must not evaluate x</span><span>
</span><span id="line-273"></span><span>        </span><span class="hs-comment">--     because runPipeline uses the StopBefore phase to pick the</span><span>
</span><span id="line-274"></span><span>        </span><span class="hs-comment">--     output filename.  That could be fixed, but watch out.</span><span>
</span><span id="line-275"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#HCc"><span class="hs-identifier hs-var">HCc</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hc&quot;</span></span><span>
</span><span id="line-276"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Ccxx"><span class="hs-identifier hs-var">Ccxx</span></a></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cpp&quot;</span></span><span>
</span><span id="line-277"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;m&quot;</span></span><span>
</span><span id="line-278"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mm&quot;</span></span><span>
</span><span id="line-279"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;c&quot;</span></span><span>
</span><span id="line-280"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-type">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;S&quot;</span></span><span>
</span><span id="line-281"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-type">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;s&quot;</span></span><span>
</span><span id="line-282"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmOpt"><span class="hs-identifier hs-var">LlvmOpt</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ll&quot;</span></span><span>
</span><span id="line-283"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmLlc"><span class="hs-identifier hs-var">LlvmLlc</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bc&quot;</span></span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#LlvmMangle"><span class="hs-identifier hs-var">LlvmMangle</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lm_s&quot;</span></span><span>
</span><span id="line-285"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmmcpp&quot;</span></span><span>
</span><span id="line-286"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmm&quot;</span></span><span>
</span><span id="line-287"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#MergeForeign"><span class="hs-identifier hs-var">MergeForeign</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span>
</span><span id="line-288"></span><span class="annot"><a href="GHC.Driver.Phases.html#phaseInputExt"><span class="hs-identifier hs-var">phaseInputExt</span></a></span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span class="annot"><a href="GHC.Driver.Phases.html#haskellish_src_suffixes"><span class="hs-identifier hs-type">haskellish_src_suffixes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#backpackish_suffixes"><span class="hs-identifier hs-type">backpackish_suffixes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#haskellish_suffixes"><span class="hs-identifier hs-type">haskellish_suffixes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#cish_suffixes"><span class="hs-identifier hs-type">cish_suffixes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-291"></span><span>    </span><span class="annot"><a href="GHC.Driver.Phases.html#haskellish_user_src_suffixes"><span class="hs-identifier hs-type">haskellish_user_src_suffixes</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#haskellish_sig_suffixes"><span class="hs-identifier hs-type">haskellish_sig_suffixes</span></a></span><span>
</span><span id="line-292"></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-293"></span><span class="hs-comment">-- When a file with an extension in the haskellish_src_suffixes group is</span><span>
</span><span id="line-294"></span><span class="hs-comment">-- loaded in --make mode, its imports will be loaded too.</span><span>
</span><span id="line-295"></span><span id="haskellish_src_suffixes"><span class="annot"><span class="annottext">haskellish_src_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#haskellish_src_suffixes"><span class="hs-identifier hs-var hs-var">haskellish_src_suffixes</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_user_src_suffixes"><span class="hs-identifier hs-var">haskellish_user_src_suffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-296"></span><span>                               </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hspp&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hscpp&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-297"></span><span id="haskellish_suffixes"><span class="annot"><span class="annottext">haskellish_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#haskellish_suffixes"><span class="hs-identifier hs-var hs-var">haskellish_suffixes</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_src_suffixes"><span class="hs-identifier hs-var">haskellish_src_suffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-298"></span><span>                               </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hc&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmm&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cmmcpp&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-299"></span><span id="cish_suffixes"><span class="annot"><span class="annottext">cish_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#cish_suffixes"><span class="hs-identifier hs-var hs-var">cish_suffixes</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;c&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cpp&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;C&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cc&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;cxx&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;s&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;S&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ll&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bc&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lm_s&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;m&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;M&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mm&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span class="hs-comment">-- Will not be deleted as temp files:</span><span>
</span><span id="line-302"></span><span id="haskellish_user_src_suffixes"><span class="annot"><span class="annottext">haskellish_user_src_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#haskellish_user_src_suffixes"><span class="hs-identifier hs-var hs-var">haskellish_user_src_suffixes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-303"></span><span>  </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_sig_suffixes"><span class="hs-identifier hs-var">haskellish_sig_suffixes</span></a></span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String] -&gt; [String]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hs-boot&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhs-boot&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-304"></span><span id="haskellish_sig_suffixes"><span class="annot"><span class="annottext">haskellish_sig_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#haskellish_sig_suffixes"><span class="hs-identifier hs-var hs-var">haskellish_sig_suffixes</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;hsig&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;lhsig&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-305"></span><span id="backpackish_suffixes"><span class="annot"><span class="annottext">backpackish_suffixes :: [String]
</span><a href="GHC.Driver.Phases.html#backpackish_suffixes"><span class="hs-identifier hs-var hs-var">backpackish_suffixes</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bkp&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="annot"><a href="GHC.Driver.Phases.html#objish_suffixes"><span class="hs-identifier hs-type">objish_suffixes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-308"></span><span class="hs-comment">-- Use the appropriate suffix for the system on which</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- the GHC-compiled code will run</span><span>
</span><span id="line-310"></span><span id="objish_suffixes"><span class="annot"><span class="annottext">objish_suffixes :: Platform -&gt; [String]
</span><a href="GHC.Driver.Phases.html#objish_suffixes"><span class="hs-identifier hs-var hs-var">objish_suffixes</span></a></span></span><span> </span><span id="local-6989586621680921634"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921634"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921634"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-311"></span><span>  </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;O&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;obj&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;OBJ&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-312"></span><span>  </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;o&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span class="annot"><a href="GHC.Driver.Phases.html#dynlib_suffixes"><span class="hs-identifier hs-type">dynlib_suffixes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-315"></span><span id="dynlib_suffixes"><span class="annot"><span class="annottext">dynlib_suffixes :: Platform -&gt; [String]
</span><a href="GHC.Driver.Phases.html#dynlib_suffixes"><span class="hs-identifier hs-var hs-var">dynlib_suffixes</span></a></span></span><span> </span><span id="local-6989586621680921630"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921630"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921630"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-316"></span><span>  </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dll&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DLL&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-317"></span><span>  </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSDarwin"><span class="hs-identifier hs-var">OSDarwin</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;dylib&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;so&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-318"></span><span>  </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;so&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishSuffix"><span class="hs-identifier hs-type">isHaskellishSuffix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isBackpackishSuffix"><span class="hs-identifier hs-type">isBackpackishSuffix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSrcSuffix"><span class="hs-identifier hs-type">isHaskellSrcSuffix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isCishSuffix"><span class="hs-identifier hs-type">isCishSuffix</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-321"></span><span>    </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellUserSrcSuffix"><span class="hs-identifier hs-type">isHaskellUserSrcSuffix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSigSuffix"><span class="hs-identifier hs-type">isHaskellSigSuffix</span></a></span><span>
</span><span id="line-322"></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-323"></span><span id="isHaskellishSuffix"><span class="annot"><span class="annottext">isHaskellishSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellishSuffix"><span class="hs-identifier hs-var hs-var">isHaskellishSuffix</span></a></span></span><span>     </span><span id="local-6989586621680921628"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921628"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921628"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_suffixes"><span class="hs-identifier hs-var">haskellish_suffixes</span></a></span><span>
</span><span id="line-324"></span><span id="isBackpackishSuffix"><span class="annot"><span class="annottext">isBackpackishSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isBackpackishSuffix"><span class="hs-identifier hs-var hs-var">isBackpackishSuffix</span></a></span></span><span>    </span><span id="local-6989586621680921626"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921626"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921626"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#backpackish_suffixes"><span class="hs-identifier hs-var">backpackish_suffixes</span></a></span><span>
</span><span id="line-325"></span><span id="isHaskellSigSuffix"><span class="annot"><span class="annottext">isHaskellSigSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSigSuffix"><span class="hs-identifier hs-var hs-var">isHaskellSigSuffix</span></a></span></span><span>     </span><span id="local-6989586621680921625"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921625"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921625"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_sig_suffixes"><span class="hs-identifier hs-var">haskellish_sig_suffixes</span></a></span><span>
</span><span id="line-326"></span><span id="isHaskellSrcSuffix"><span class="annot"><span class="annottext">isHaskellSrcSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSrcSuffix"><span class="hs-identifier hs-var hs-var">isHaskellSrcSuffix</span></a></span></span><span>     </span><span id="local-6989586621680921624"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921624"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921624"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_src_suffixes"><span class="hs-identifier hs-var">haskellish_src_suffixes</span></a></span><span>
</span><span id="line-327"></span><span id="isCishSuffix"><span class="annot"><span class="annottext">isCishSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isCishSuffix"><span class="hs-identifier hs-var hs-var">isCishSuffix</span></a></span></span><span>           </span><span id="local-6989586621680921623"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921623"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921623"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#cish_suffixes"><span class="hs-identifier hs-var">cish_suffixes</span></a></span><span>
</span><span id="line-328"></span><span id="isHaskellUserSrcSuffix"><span class="annot"><span class="annottext">isHaskellUserSrcSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellUserSrcSuffix"><span class="hs-identifier hs-var hs-var">isHaskellUserSrcSuffix</span></a></span></span><span> </span><span id="local-6989586621680921622"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921622"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921622"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="GHC.Driver.Phases.html#haskellish_user_src_suffixes"><span class="hs-identifier hs-var">haskellish_user_src_suffixes</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.Driver.Phases.html#isObjectSuffix"><span class="hs-identifier hs-type">isObjectSuffix</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isDynLibSuffix"><span class="hs-identifier hs-type">isDynLibSuffix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-331"></span><span id="isObjectSuffix"><span class="annot"><span class="annottext">isObjectSuffix :: Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isObjectSuffix"><span class="hs-identifier hs-var hs-var">isObjectSuffix</span></a></span></span><span> </span><span id="local-6989586621680921621"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921621"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921620"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921620"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921620"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [String]
</span><a href="GHC.Driver.Phases.html#objish_suffixes"><span class="hs-identifier hs-var">objish_suffixes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921621"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-332"></span><span id="isDynLibSuffix"><span class="annot"><span class="annottext">isDynLibSuffix :: Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isDynLibSuffix"><span class="hs-identifier hs-var hs-var">isDynLibSuffix</span></a></span></span><span> </span><span id="local-6989586621680921619"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921619"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921618"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921618"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921618"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; [String]
</span><a href="GHC.Driver.Phases.html#dynlib_suffixes"><span class="hs-identifier hs-var">dynlib_suffixes</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921619"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span class="annot"><a href="GHC.Driver.Phases.html#isSourceSuffix"><span class="hs-identifier hs-type">isSourceSuffix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-335"></span><span id="isSourceSuffix"><span class="annot"><span class="annottext">isSourceSuffix :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isSourceSuffix"><span class="hs-identifier hs-var hs-var">isSourceSuffix</span></a></span></span><span> </span><span id="local-6989586621680921617"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921617"><span class="hs-identifier hs-var">suff</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellishSuffix"><span class="hs-identifier hs-var">isHaskellishSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921617"><span class="hs-identifier hs-var">suff</span></a></span><span>
</span><span id="line-336"></span><span>                    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isCishSuffix"><span class="hs-identifier hs-var">isCishSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921617"><span class="hs-identifier hs-var">suff</span></a></span><span>
</span><span id="line-337"></span><span>                    </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isBackpackishSuffix"><span class="hs-identifier hs-var">isBackpackishSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921617"><span class="hs-identifier hs-var">suff</span></a></span><span>
</span><span id="line-338"></span><span>
</span><span id="line-339"></span><span class="hs-comment">-- | When we are given files (modified by -x arguments) we need</span><span>
</span><span id="line-340"></span><span class="hs-comment">-- to determine if they are Haskellish or not to figure out</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- how we should try to compile it.  The rules are:</span><span>
</span><span id="line-342"></span><span class="hs-comment">--</span><span>
</span><span id="line-343"></span><span class="hs-comment">--      1. If no -x flag was specified, we check to see if</span><span>
</span><span id="line-344"></span><span class="hs-comment">--         the file looks like a module name, has no extension,</span><span>
</span><span id="line-345"></span><span class="hs-comment">--         or has a Haskell source extension.</span><span>
</span><span id="line-346"></span><span class="hs-comment">--</span><span>
</span><span id="line-347"></span><span class="hs-comment">--      2. If an -x flag was specified, we just make sure the</span><span>
</span><span id="line-348"></span><span class="hs-comment">--         specified suffix is a Haskell one.</span><span>
</span><span id="line-349"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishTarget"><span class="hs-identifier hs-type">isHaskellishTarget</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#Phase"><span class="hs-identifier hs-type">Phase</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-350"></span><span id="isHaskellishTarget"><span class="annot"><span class="annottext">isHaskellishTarget :: (String, Maybe Phase) -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellishTarget"><span class="hs-identifier hs-var hs-var">isHaskellishTarget</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680921616"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921616"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Maybe Phase
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-351"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Utils.Misc.html#looksLikeModuleName"><span class="hs-identifier hs-var">looksLikeModuleName</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921616"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSrcFilename"><span class="hs-identifier hs-var">isHaskellSrcFilename</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921616"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="../../filepath/src/System.FilePath.Windows.html#hasExtension"><span class="hs-identifier hs-var">hasExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921616"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-352"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishTarget"><span class="hs-identifier hs-var">isHaskellishTarget</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680921612"><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921612"><span class="hs-identifier hs-var">phase</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-353"></span><span>  </span><span class="annot"><span class="annottext">Phase
</span><a href="#local-6989586621680921612"><span class="hs-identifier hs-var">phase</span></a></span><span> </span><span class="annot"><span class="annottext">Phase -&gt; [Phase] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Phase
</span><a href="GHC.Driver.Phases.html#As"><span class="hs-identifier hs-var">As</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cc"><span class="hs-identifier hs-var">Cc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjc"><span class="hs-identifier hs-var">Cobjc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cobjcxx"><span class="hs-identifier hs-var">Cobjcxx</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#CmmCpp"><span class="hs-identifier hs-var">CmmCpp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#Cmm"><span class="hs-identifier hs-var">Cmm</span></a></span><span>
</span><span id="line-354"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Phase
</span><a href="GHC.Driver.Phases.html#StopLn"><span class="hs-identifier hs-var">StopLn</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellishFilename"><span class="hs-identifier hs-type">isHaskellishFilename</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSrcFilename"><span class="hs-identifier hs-type">isHaskellSrcFilename</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isCishFilename"><span class="hs-identifier hs-type">isCishFilename</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-357"></span><span>    </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellUserSrcFilename"><span class="hs-identifier hs-type">isHaskellUserSrcFilename</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isSourceFilename"><span class="hs-identifier hs-type">isSourceFilename</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isHaskellSigFilename"><span class="hs-identifier hs-type">isHaskellSigFilename</span></a></span><span>
</span><span id="line-358"></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-359"></span><span class="hs-comment">-- takeExtension return .foo, so we drop 1 to get rid of the .</span><span>
</span><span id="line-360"></span><span id="isHaskellishFilename"><span class="annot"><span class="annottext">isHaskellishFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellishFilename"><span class="hs-identifier hs-var hs-var">isHaskellishFilename</span></a></span></span><span>     </span><span id="local-6989586621680921609"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921609"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellishSuffix"><span class="hs-identifier hs-var">isHaskellishSuffix</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921609"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-361"></span><span id="isHaskellSrcFilename"><span class="annot"><span class="annottext">isHaskellSrcFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSrcFilename"><span class="hs-identifier hs-var hs-var">isHaskellSrcFilename</span></a></span></span><span>     </span><span id="local-6989586621680921606"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921606"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSrcSuffix"><span class="hs-identifier hs-var">isHaskellSrcSuffix</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921606"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span id="isCishFilename"><span class="annot"><span class="annottext">isCishFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isCishFilename"><span class="hs-identifier hs-var hs-var">isCishFilename</span></a></span></span><span>           </span><span id="local-6989586621680921605"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921605"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isCishSuffix"><span class="hs-identifier hs-var">isCishSuffix</span></a></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921605"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span id="isHaskellUserSrcFilename"><span class="annot"><span class="annottext">isHaskellUserSrcFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellUserSrcFilename"><span class="hs-identifier hs-var hs-var">isHaskellUserSrcFilename</span></a></span></span><span> </span><span id="local-6989586621680921604"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921604"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellUserSrcSuffix"><span class="hs-identifier hs-var">isHaskellUserSrcSuffix</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921604"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-364"></span><span id="isSourceFilename"><span class="annot"><span class="annottext">isSourceFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isSourceFilename"><span class="hs-identifier hs-var hs-var">isSourceFilename</span></a></span></span><span>         </span><span id="local-6989586621680921603"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921603"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isSourceSuffix"><span class="hs-identifier hs-var">isSourceSuffix</span></a></span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921603"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-365"></span><span id="isHaskellSigFilename"><span class="annot"><span class="annottext">isHaskellSigFilename :: String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSigFilename"><span class="hs-identifier hs-var hs-var">isHaskellSigFilename</span></a></span></span><span>     </span><span id="local-6989586621680921602"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921602"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isHaskellSigSuffix"><span class="hs-identifier hs-var">isHaskellSigSuffix</span></a></span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921602"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span class="annot"><a href="GHC.Driver.Phases.html#isObjectFilename"><span class="hs-identifier hs-type">isObjectFilename</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#isDynLibFilename"><span class="hs-identifier hs-type">isDynLibFilename</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-368"></span><span id="isObjectFilename"><span class="annot"><span class="annottext">isObjectFilename :: Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isObjectFilename"><span class="hs-identifier hs-var hs-var">isObjectFilename</span></a></span></span><span> </span><span id="local-6989586621680921601"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921601"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921600"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921600"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isObjectSuffix"><span class="hs-identifier hs-var">isObjectSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921601"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921600"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-369"></span><span id="isDynLibFilename"><span class="annot"><span class="annottext">isDynLibFilename :: Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isDynLibFilename"><span class="hs-identifier hs-var hs-var">isDynLibFilename</span></a></span></span><span> </span><span id="local-6989586621680921599"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921599"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680921598"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921598"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String -&gt; Bool
</span><a href="GHC.Driver.Phases.html#isDynLibSuffix"><span class="hs-identifier hs-var">isDynLibSuffix</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680921599"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ShowS
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ShowS
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="../../filepath/src/System.FilePath.Windows.html#takeExtension"><span class="hs-identifier hs-var">takeExtension</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621680921598"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-370"></span></pre></body></html>